#include <catch2/catch.hpp>

#include "solution.hpp"

using namespace solution_042;

TEST_CASE("042_trapping_rain_water", "[042]")
{
    CHECK(Solution().trap({0,1,0,2,1,0,1,3,2,1,2,1}) == 6);
    CHECK(Solution().trap({4,2,0,3,2,5})             == 9);
    CHECK(Solution().trap({1,2,1})                   == 0);
    CHECK(Solution().trap({0,0,0})                   == 0);
}
